import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/HelloWorld'
import shouye from '@/components/shouye'
import details from '@/components/details'
import grzx from '@/components/personaCenter'
import gren from '@/components/gren'
import login from '@/components/login'
import register from '@/components/register'
import pixi from '@/components/pixi'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index,
        redirect:'/shouye',
        children:[
            {
                path: '/shouye',
                name:'shouye',
                component:shouye
            },
            {
                path: '/grzx',
                name:'grzx',
                component:grzx
            },
            {
                path: '/details/:id',
                name:'details',
                component:details
            },
            {
                path: '/gren',
                name:'gren',
                component:gren
            },
          {
            path: '/pixijs',
            name:'pixijs',
            component:pixi
          },

        ]
    },
      {
          path: '/login',
          name: 'heh',
          component: login
      }
      ,
      {
          path: '/register',
          name: 'regs',
          component: register
      }
  ]
})
